home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of Select: Games Special 15
/
TboS Games Special 15.iso
/
xtra
/
rar155
/
sfx.doc
< prev
next >
Wrap
Text File
|
1995-08-19
|
23KB
|
629 lines
██████╗ █████╗ ██████╗ RAR version 1.55
██╔══██╗ ██╔══██╗ ██╔══██╗ ~~~~~~~~~~~~~~~~
██████╔╝ ███████║ ██████╔╝ Multifunctional Integrated Archive Manager
██╔══██╗ ██╔══██║ ██╔══██╗ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
██║ ██║ ██║ ██║ ██║ ██║ The Installation SFX for DOS User's Manual
╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. SFX functionality overview.
The SFX (SelF-eXtracting module) is the archive module used to extract
files when executed. It is in the form of a normal executable file.
The RAR Archiver offers SFX-functionality which is significantly
enhanced over common SFX, as well as the possibility to create an SFX
archive, with an alternate SFX module from an external file.
The alternate SFX module can be created by using the switch
'-sfx[<sfxfile>]' or the command 's[<sfxfile>]' when, in the optional
parameter <sfxfile>, you indicate the required SFX executable module.
Several RAR SFX executable modules are currently available:
- the common SFX for DOS (default in the DOS version, file dos.sfx);
- the Installation SFX for DOS (file idos.sfx);
- the common SFX for OS/2 (default in the OS/2 version, file os2.sfx).
In fact you may add your own RAR SFX executable module using unRAR
sources (e.g. for your particular OS or special needs).
2. The Installation SFX.
As an alternative to the default SFX you may build an Installation
SFX which uses a powerful script language, providing original features:
- fully configurable, friendly, menu-driven interface;
- check for free disk space before installation;
- request destination path to which to install files;
- installation status - file extraction progress bar,
completed percentage and other features.
The Installation Script is a plain ASCII text file, which may be prepared
using your favourite text editor. The script is placed in the SFX
archive comment to be processed by the Installation SFX module when it
is executed. For example, you may use the following command line to
create such an SFX archive:
rar a -sfxidos.sfx -zmyinst.s minstall
Where 'idos.sfx' is the pathname of Installation SFX module and the file
myinst.s is the text file containing your installation script.
The Installation SFX contains build-in interpreter of the Script
Language.
2.1 Installation Script Language
As a program language the script contains the following objects:
Command statement initiating an action;
Procedure commands defined apparently to be called from the main
script code;
Function built-in procedure which returns a value;
Constant character string or a numeric value (4 bytes length);
Variable name defining a storage place for a value.
Variables may be assigned a numeric value or a character string.
All variables are global, meaning once defined the variable is the
same within the main code and all procedures.
Variable and procedure names are case-sensitive.
Command statements are case-insensitive.
Command and built-in procedures may be called with parameters -
constants and variables. Expressions may not be used as parameters.
2.1.1. Control commands
CALL Initiate a procedure call:
CALL <ProcName>
<ProcName> is the procedure name (defined with PROC).
DELAY Suspend script execution:
DELAY [<ms>]
<ms> is the delay interval (milliseconds). If the interval
is ommited, an infinite interval will be set. Execution
continues following a key press or mouse click.
EXCLUDE Define the list of files NOT to be extracted from the archive
while installing:
EXCLUDE [ <File1> [, <File2>..] ]
<File1>, <File2>.. are variables or character strings
containing the names of files to be excluded. Wildcards are
permitted.
The initial value of this file list is "", meaning "no files
to exclude". EXCLUDE without any parameters would restore the
initial value of the file list.
EXIT Terminate the Installation SFX:
EXIT <Code>
SFX exits with errorlevel = <Code>.
GOTO Transfer control to a string in the script, identified
by a label:
GOTO <Label>
<Label> is the name in the script followed by a colon ':'
character. For example:
GOTO Menu
...
Menu:
IF Conditionally execute commands:
IF <Var> <?> <Value>
<commands>
...
ENDIF
Control flow statement that defines conditional execution of
the statements within the block IF...ENDIF structure. <Var>
is a variable to be compared with the <Value> using a single
comparison operator, if the result of the comparison is TRUE
then the statements within the IF...ENDIF are executed.
Comparison operators are:-
'==' .. EQUAL TO
'!=' .. NOT EQUAL TO
'>' .. GREATER THAN
'>=' .. GREATER THAN OR EQUAL TO
'<' .. LESS THAN
'<=' .. LESS THAN OR EQUAL TO
<Value> is a constant or variable.
Character values may be compared using only the '==' or '!='
comparison operations.
INCLUDE Define the list of files to be extracted from the archive
while installing:
INCLUDE [ <File1> [, <File2>..] ]
<File1>, <File2>.. are variables or character strings
containing the names of files to be extracted. Wildcards
permitted.
The initial value of this file list is "*.*" meaning
"all files in the archive". The first INCLUDE defined will
replace the default value with the specified value. All
further INCLUDE's will add file names to the list without
removing previous values.
To clear all the file names in the INCLUDE list, give the
INCLUDE statement without parameters.
INSTALL Begin installation. If no INSTALL statement is given,
installation will begin when the end of main script code
is reached.
OVERWRITE Set overwrite mode when extracting archived files:
OVERWRITE { ON | OFF | FRESH | UPDATE }
ON always overwrite existing files
OFF never overwrite existing files
FRESH only overwrite files which exist in the destination
directory and are newer in the archive
UPDATE As for FRESH but also extract files which do not
exist in the destination directory
PROC Define a procedure:
PROC <ProcName>
<commands here>
...
ENDP
<ProcName> is the procedure name. May be called with the
CALL statement - commands between PROC and ENDP would be
processed.
SOUND Produce sounds on the PC speaker:
SOUND <F1>, <D1> [, <F2>, <D2>...]
<F1> is frequency and <D1> - duration in milliseconds of
produced beep. You may produce as many notes as required
SYSTEM Issue an OS command:
SYSTEM <Arg1> [, <Arg2>..]
The command line merged from parameters <Arg1>, <Arg2>...
is executed.
;